package com.heima.article.listener;

import com.heima.article.service.ApArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author 黄晏凯
 */
@Component
public class ArticleListener {

    @Autowired
    private ApArticleService apArticleService;

    @KafkaListener(topics = "wmNews-topic")
    public void onMessageObj(String msg) {
        apArticleService.updateIsDown(msg);
    }

}